//
// Created by Administrator on 2025/4/21/周一.
//
#include "iostream"

using namespace std;

class Building {
    friend class GoodGay;

public:
    string m_SittingRoom;
private:
    string m_BedRoom;
public:
    Building();
};

class GoodGay {

public:
    GoodGay();

    void visit();//参观函数   访问building中的属性

private:
    Building *building;
};

Building::Building() {
    this->m_BedRoom = "卧室";
    this->m_SittingRoom = "客厅";
}

GoodGay::GoodGay() {
    building = new Building();
}

void GoodGay::visit() {
    cout << "好基友正在访问" << building->m_SittingRoom << endl;
    cout << "好基友正在访问" << building->m_BedRoom << endl;
}

void test01() {
    GoodGay gg;
    gg.visit();
}

int main() {
    test01();
}